package com.psp.bu.persist.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.psp.bu.model.InvoiceHeaderBean;
import com.psp.bu.persist.dao.InvoiceHeaderDao;

@Repository
public class InvoiceHeaderImpl extends BaseImpl implements InvoiceHeaderDao {
	protected static final String NAME_SPACE = NAME_SPACE_HEADER + ".InvoiceHeaderMapper";

	@Override
	public InvoiceHeaderBean selectById(String id) {
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectById", id);
	}

	@Override
	public List<InvoiceHeaderBean> selectByIds(Set<String> ids) {
		Map<String, Object> where = new HashMap<>();
		where.put("ids", ids);
		return sqlSessionTemplate.selectList(NAME_SPACE + ".selectByIds", where);
	}

}
